package com.example.banksystem.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 存款实体类：映射数据库 transactions 表的存款相关记录
 */
public class Deposit {
    private Integer transactionId; // 交易ID（自增主键）
    private String type; // 存款类型：活期存款/定期存款
    private LocalDateTime time; // 交易时间
    private String cardNumber; // 银行卡号（关联账户）
    private BigDecimal amount; // 存款金额
    private String transactionPwd; // 交易密码（前端传递，后端验证）
    private BigDecimal maturityInterest; // 到期利息（仅定期存款）
    private LocalDateTime maturityDate; // 到期时间（仅定期存款）
    private String remark; // 备注信息

    // getter/setter 方法
    public Integer getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(Integer transactionId) {
        this.transactionId = transactionId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public LocalDateTime getTime() {
        return time;
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getTransactionPwd() {
        return transactionPwd;
    }

    public void setTransactionPwd(String transactionPwd) {
        this.transactionPwd = transactionPwd;
    }

    public BigDecimal getMaturityInterest() {
        return maturityInterest;
    }

    public void setMaturityInterest(BigDecimal maturityInterest) {
        this.maturityInterest = maturityInterest;
    }

    public LocalDateTime getMaturityDate() {
        return maturityDate;
    }

    public void setMaturityDate(LocalDateTime maturityDate) {
        this.maturityDate = maturityDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
